package com.yima.baseproj.module.app.equipmentDevice;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yima.baseproj.module.config.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

import com.yima.baseproj.module.app.equipmentDevice.model.*;

@Data
@TableName("equipment_device")
public class EquipmentDeviceEntity extends BaseEntity {


    @ApiModelProperty(value = "事件名称")
    @TableField(value = "event_code")
    private String eventCode;


    @ApiModelProperty(value = "事件主体Guid")
    @TableField(value = "event_guid")
    private String eventGuid;


    @ApiModelProperty(value = "设备序列号")
    @TableField(value = "device_no")
    private String deviceNo;


    @ApiModelProperty(value = "设备内网ip")
    @TableField(value = "device_ip")
    private String deviceIp;


    @ApiModelProperty(value = "人员guid 或者STRANGERBABY")
    @TableField(value = "admit_guid")
    private String admitGuid;


    @ApiModelProperty(value = "识别模式,1:人像识别, 2:刷卡识别 ,3:人卡合一 4,人证比对 5:按钮开门 6：远程开门 7:密码识别 8：人+密码开门 9:口罩测温检测 10:二维码识别 11: 刷身份证 12:指纹识别")
    @TableField(value = "rec_mode")
    private String recMode;


    @ApiModelProperty(value = "现场照url")
    @TableField(value = "file_path")
    private String filePath;


    @ApiModelProperty(value = "识别记录时间戳")
    @TableField(value = "show_time")
    private Long showTime;


    @ApiModelProperty(value = "活体结果 1:活体判断成功 2:活体判断失败 3:未进行活体判断")
    @TableField(value = "alive_type")
    private Long aliveType;


    @ApiModelProperty(value = "识别分数")
    @TableField(value = "rec_score")
    private Long recScore;


    @ApiModelProperty(value = "软件版本号")
    @TableField(value = "device_version")
    private String deviceVersion;


    @ApiModelProperty(value = "设备来源")
    @TableField(value = "source")
    private Long source;


    @ApiModelProperty(value = "人员比对结果,1:比对成功 2:比对失败")
    @TableField(value = "type")
    private Long type;


    @ApiModelProperty(value = "识别卡号")
    @TableField(value = "card_no")
    private String cardNo;


    @ApiModelProperty(value = "	设备名称")
    @TableField(value = "device_name")
    private String deviceName;


    @ApiModelProperty(value = "比对模式,1:本地识别 2:云端识别")
    @TableField(value = "rec_type")
    private Long recType;


    @ApiModelProperty(value = "有效日期判断 1:有效期内 2:有效期外 3:未进行有效期判断")
    @TableField(value = "permission_time_type")
    private Long permissionTimeType;


    @ApiModelProperty(value = "有效时间段判断 1:时间段内 2:时间段外 3:未进行时间段判断")
    @TableField(value = "pass_time_type")
    private Long passTimeType;


    @ApiModelProperty(value = "识别模式判断 1. 模式正确 2.模式不正确")
    @TableField(value = "rec_mode_type")
    private Long recModeType;


    @ApiModelProperty(value = "	保留字段")
    @TableField(value = "storage_id")
    private String storageId;


    @ApiModelProperty(value = "当前时间戳")
    @TableField(value = "timestamp")
    private Long timestamp;


    @ApiModelProperty(value = "识别主体姓名")
    @TableField(value = "admit_name")
    private String admitName;


    @ApiModelProperty(value = "姓名")
    @TableField(value = "cardinfo_name")
    private String cardinfoName;


    @ApiModelProperty(value = "性别")
    @TableField(value = "cardinfo_sex")
    private String cardinfoSex;


    @ApiModelProperty(value = "公民身份号码")
    @TableField(value = "cardinfo_idNum")
    private String cardinfoIdnum;


    @ApiModelProperty(value = "住址")
    @TableField(value = "cardinfo_address")
    private String cardinfoAddress;


    @ApiModelProperty(value = "签发机关")
    @TableField(value = "cardinfo_issuingOrgan")
    private String cardinfoIssuingorgan;


    @ApiModelProperty(value = "身份证照")
    @TableField(value = "cardinfo_photoPath")
    private String cardinfoPhotopath;


    @ApiModelProperty(value = "有效期限")
    @TableField(value = "cardinfo_usefulLife")
    private String cardinfoUsefullife;


    @ApiModelProperty(value = "比对结果")
    @TableField(value = "cardinfo_compareResult")
    private String cardinfoCompareresult;


    @ApiModelProperty(value = "卡编号,部分身份证阅读器不支持读取")
    @TableField(value = "cardinfo_id")
    private Long cardinfoId;


    @ApiModelProperty(value = "比对时间")
    @TableField(value = "cardinfo_createTime")
    private Long cardinfoCreatetime;


    @ApiModelProperty(value = "比对设备序列号")
    @TableField(value = "cardinfo_deviceKey")
    private String cardinfoDevicekey;


    @ApiModelProperty(value = "")
    @TableField(value = "app_id")
    private Long appId;


    @ApiModelProperty(value = "动作Id，唯一标识")
    @TableField(value = "action_id")
    private Long actionId;

    @ApiModelProperty(value = "人像guid")
    @TableField(value = "face_guid")
    private String faceGuid;
    @ApiModelProperty(value = "场景Guid")
    @TableField(value = "scene_guid")
    private String sceneGuid;

    @ApiModelProperty(value = "错误码，当status=1时，此处有值")
    @TableField(value = "code")
    private String code;
    @ApiModelProperty(value = "销权状态：0：成功，1：失败")
    @TableField(value = "status")
    private Long status;

    @ApiModelProperty(value = "开始时间 ")
    private String deviceInitiate;
    @ApiModelProperty(value = "结束时间 ")
    private String deviceFinish;


    public void setData(EquipmentDeviceAddParamModel paramModel) {
        this.eventCode = paramModel.getEventCode();
        this.eventGuid = paramModel.getEventGuid();
        this.deviceNo = paramModel.getDeviceNo();
        this.deviceIp = paramModel.getDeviceIp();
        this.admitGuid = paramModel.getAdmitGuid();
        this.recMode = paramModel.getRecMode();
        this.filePath = paramModel.getFilePath();
        this.showTime = paramModel.getShowTime();
        this.aliveType = paramModel.getAliveType();
        this.recScore = paramModel.getRecScore();
        this.deviceVersion = paramModel.getDeviceVersion();
        this.source = paramModel.getSource();
        this.type = paramModel.getType();
        this.cardNo = paramModel.getCardNo();
        this.deviceName = paramModel.getDeviceName();
        this.recType = paramModel.getRecType();
        this.permissionTimeType = paramModel.getPermissionTimeType();
        this.passTimeType = paramModel.getPassTimeType();
        this.recModeType = paramModel.getRecModeType();
        this.storageId = paramModel.getStorageId();
        this.timestamp = paramModel.getTimestamp();
        this.admitName = paramModel.getAdmitName();
        this.cardinfoName = paramModel.getCardinfoName();
        this.cardinfoSex = paramModel.getCardinfoSex();
        this.cardinfoIdnum = paramModel.getCardinfoIdnum();
        this.cardinfoAddress = paramModel.getCardinfoAddress();
        this.cardinfoIssuingorgan = paramModel.getCardinfoIssuingorgan();
        this.cardinfoPhotopath = paramModel.getCardinfoPhotopath();
        this.cardinfoUsefullife = paramModel.getCardinfoUsefullife();
        this.cardinfoCompareresult = paramModel.getCardinfoCompareresult();
        this.cardinfoId = paramModel.getCardinfoId();
        this.cardinfoCreatetime = paramModel.getCardinfoCreatetime();
        this.cardinfoDevicekey = paramModel.getCardinfoDevicekey();
        this.appId = paramModel.getAppId();
        this.actionId = paramModel.getActionId();
        this.faceGuid = paramModel.getFaceGuid();
        this.sceneGuid = paramModel.getSceneGuid();
        this.code = paramModel.getCode();
        this.status = paramModel.getStatus();
        this.deviceInitiate = paramModel.getDeviceInitiate();
        this.deviceFinish = paramModel.getDeviceFinish();
    }
}